# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
maintainer="team/kde <bribbers@disroot.org>"
pkgname=kalzium
pkgver=24.08.2
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://edu.kde.org/kalzium/"
pkgdesc="Periodic Table of Elements"
license="GPL-2.0-or-later AND LGPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	eigen-dev
	extra-cmake-modules
	karchive-dev
	kconfig-dev
	kcoreaddons-dev
	kdoctools-dev
	ki18n-dev
	knewstuff-dev
	kparts-dev
	kplotting-dev
	kunitconversion-dev
	kwidgetsaddons-dev
	qt6-qtbase-dev
	qt6-qtscxml-dev
	qt6-qtsvg-dev
	samurai
	solid-dev
	"
subpackages="$pkgname-doc $pkgname-lang $pkgname-dev"
_repo_url="https://invent.kde.org/education/kalzium.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kalzium-$pkgver.tar.xz"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DBUILD_WITH_QT6=ON \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
d8438ae175a74ea859601a6dc8becd6a31c37853de57532c040b34e979f77142481e57b98f4a4e8fb86ca6c2f25b9dc2bd9b68d35243f760f3781cc5179ff6ca  kalzium-24.08.2.tar.xz
"
